#!/bin/bash

echo $_
echo $!
echo "========"
a="wang lei jie"
for var in "$a"
do
	echo "$var " 
done

if [[ 0  = 1 ]]
then
	echo "true"
else
	echo "false"
fi

if [[ 5 > 3 ]]
then 
	echo "larger"
else
	echo "less"
fi

if [ 5 > 3 ]
then 
	echo "larger"
else
	echo "less"
fi

if [ -z $string1 ] 
then
	echo "String is not null"
else
	echo "String is null"
fi

if [ -n "$string1" ] 
then
	echo "String is not null"
else
	echo "String is null"

fi

string1="a = b"
if [ $string1 ] 
then
	echo "not null"
else
	echo "null"
fi


if [ ! -n "$1" ] 
then
	echo "null"
else
	echo "not null"
fi

echo "============"

a=10;
echo `expr a=$a+1` 
echo $a

for file in /proc/[0-9]*
do
	echo $[file##]
done

for (( a=1; a < 10 ; a++ ))
do
	echo $a 
done

echo "============"

(( a = 1 )) 
while (( a < 10 ))
do
	echo $a 
	(( a += 1 ))
done

if ls -l &>/dev/null
then
	echo "sucess"
fi
echo "================"
str="wangleijie"
show(){
	echo $str
	echo "$str"
	echo $1
  echo | awk -F ":" '{print str1}' str1=$1
}

show $str
